package com.liang.hash;

import java.util.LinkedHashSet;

public class LinkedHashSetDemo1 {
    public static void main(String[] args) {
        LinkedHashSet<Student> set = new LinkedHashSet<>();
        Student stu1 = new Student("xiaohei", 22);
        Student stu2 = new Student("xiaohei", 22);
        Student stu3 = new Student("xiaomei", 23);

        set.add(stu1);
        set.add(stu2);
        set.add(stu3);

        System.out.println(set);
    }
}
